<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class modelo extends object_standard {

    //attribute variables 
    protected $codigo;
    protected $nombre;
    protected $descripcion;
    protected $responsable;
    //components 
    var $components = array();
    //auxiliars for primary key and for files 
    var $auxiliars = array();

    //data about the attributes 
    public function metadata() {
        return array("codigo" => array(), "nombre" => array(), "descripcion" => array(),
            "responsable" => array("foreign_name" => "d_m", "foreign" => "disenador", "foreign_attribute" => "identificacion"));
    }

    public function primary_key() {
        return array("codigo");
    }

    public function relational_keys($class, $rel_name) {
        switch ($class) {
            case "disenador":
                switch ($rel_name) {
                    case "d_m":
                        return array("responsable");
                        break;
                }
                break;

            default:
                break;
        }
    }



}
?>
